home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / jreboot.arc / JREBOOT.TXT < prev    next >
Encoding:
Text File  |  1987-02-08  |  3.1 KB  |  81 lines

  1. Warm JRAM3 Reboots from a Batch File
  2.  
  3.      TallTree's JRAM3 board comes with quite a bit of software,
  4. including the device driver JBOOT.BIN.   Among its options is a
  5. warm reboot which will preserve the contents of a RAM disk. 
  6. Unfotunately, the only way which TallTree offers to perform this
  7. reboot is with a Control-Alt-Delete.  This note will tell you one
  8. way to warm reboot from a program if you have JBOOT.BIN, Version
  9. 3.41.
  10.  
  11.      Why would anyone want to do that?  The main reason I can
  12. think of today would be to change one or more device drivers by
  13. using a different CONFIG.SYS.  Until recently, rebooting was the
  14. only way to get rid of some memory resident programs.  Now, with
  15. Kim Kokkonen's MARK and RELEASE and several other programs, you
  16. can control terninate-and-stay-resident programs without
  17. rebooting.  I suppose that there are other reasons to reboot with
  18. a different AUTOEXEC.BAT file, but I can't think of them offhand.
  19.  
  20.      TallTree includes a program MAKEDOS.COM.  MAKEDOS will let
  21. you set the size of RAM without changing your CONFIG.SYS file. 
  22. It does this by rebooting and forcing memory to resize.  You can
  23. specify the same size as you have by requesting 0 bytes of RAM,
  24. that is, "MAKEDOS 0".  To get a warm reboot from "MAKEDOS 0", all
  25. you must do is change one instruction of JBOOT.BIN.
  26.  
  27.      TallTree also furnishes the source for JBOOT.BIN.  When I
  28. reassembled it, I got the following excerpts:
  29. 037B makedos:
  30. 037B 0E              push    cs
  31. 037C 1F              pop     ds
  32. 037D 33 C0           xor     ax,ax
  33. 037F 97              xchg    ax,di
  34. 0380 0B C0           or      ax,ax
  35. 0382 74 10           jz      new58a
  36. (CHANGE TO           jz      warmreset)
  37.              . . .
  38. 0398 EB 4A 90        jmp     warmreset
  39.  
  40.              . . .
  41.  
  42. 03E4 warmreset:
  43. 03E4 FA              cli
  44. 03E5 FC              cld
  45. 03E6 0E              push    cs
  46. 03E7 1F              pop     ds
  47. 03E8 B0 FD           mov     al,not bit1
  48. 03EA E6 21           out     21,al
  49.  
  50.      DON'T MODIFY YOUR ORIGINAL PROGRAM.  If you ruin it, you
  51. could be in serious trouble.
  52.  
  53. 1.  "debug jboot.bin" on a copy of jboot.bin.  Recall that debug
  54. adds 100 to all addresses.
  55.  
  56. 2.  "d478 483", then check that bytes 37B through 383 match. 
  57. "d4E4 4EB", then check that bytes 3E4 through 3EB match.
  58.  
  59. 3.  If they match, "a 482", then "jz 4E4".  If they don't, quit
  60. debug.
  61.  
  62. 4.  If they matched, "w" to write the file, then "q" to quit.
  63.  
  64. 5.  Check it out by manually rebooting with the new JBOOT.BIN,
  65. putting a file or two on your RAM disk if you have one, then
  66. entering "MAKEDOS 0" and checking your RAM disk and its files.
  67.  
  68.      If the program didn't match, you could reassemble and list
  69. JBOOT.ASM.  I have not seen other versions, but perhaps they are
  70. very similar.
  71.  
  72.      I can't think of why I might want to force memory to resize
  73. to the same size as it is, so I can see no harm in the change. 
  74. Your needs may be different.
  75.  
  76.      This patch has worked for me.  I hope it does for you, but
  77. if it doesn't, I will accept no responsibility for any bad things
  78. which might happen because of it.
  79.  
  80. Lew Paper
  81. 2/8/87